
package com.stottlerhenke.simbionic.engine.parser;

import com.stottlerhenke.simbionic.engine.core.*;
import com.stottlerhenke.simbionic.api.*;

/**
 * Expression subclass for static member references
 */
public class SB_ExpClass extends SB_Expression
{
	protected String _id;

	public SB_ExpClass(String id)
	{
		super();
		_id = id;
	}
	
	public EExpressionType GetType()
	{ 
		return EExpressionType.kClass; 
	}
	
	public SB_Variable Evaluate(SB_Entity entity, SB_ExecutionFrame contextFrame) throws SB_Exception
  {
		return new SB_VarClass((String) contextFrame.GetBook().getUserClassMap().getJavaClassName(_id));
  }
	
  public String PrintTree() throws SB_Exception
  {
    return new String("class(" + _id + ")");
  }
  
	public String GetName()
	{ 	
		return _id;
	}
}
